from pydantic import ConfigDict

from app.models.base import SQLBaseModel, IdType
from app.models.file import BaseFile
from app.utils.decorators.optional import optional


class FileCreate(BaseFile):
    pass


@optional(without_fields=["id"])
class FileUpdate(BaseFile):
    id: IdType


class FileOut(SQLBaseModel, BaseFile):
    model_config = ConfigDict(from_attributes=True)

class FileExport(FileOut):
    model_config = ConfigDict(from_attributes=True)
